package gui;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Color;
import java.awt.GridBagLayout;
import javax.swing.JPanel;
import javax.swing.JLabel;
import java.awt.Rectangle;
import java.awt.Font;
import java.sql.SQLException;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

public class fileGUI extends JPanel {
	TeacherMainMenuGUI tmmc;
	public JButton button_2;
	public JButton button;
	public Label label;
	public JButton btnUpdateDateTo;
	public JLabel lblAssid;
	
	//filecode fc;
	public fileGUI() {
		super();
		setBackground(UIManager.getColor("InternalFrame.activeTitleBackground"));
		initialize();
	}
	private void initialize() {
		this.setSize(900,600);
		this.setBackground(UIManager.getColor("InternalFrame.activeTitleBackground"));
		SpringLayout springLayout = new SpringLayout();
		setLayout(springLayout);
		
		label = new Label("fileID");
		springLayout.putConstraint(SpringLayout.NORTH, label, 38, SpringLayout.NORTH, this);
		springLayout.putConstraint(SpringLayout.WEST, label, 57, SpringLayout.WEST, this);
		add(label);
		label.setVisible(false);
		
		button = new JButton("Download assignments");
		springLayout.putConstraint(SpringLayout.EAST, button, -343, SpringLayout.EAST, this);
		button.setFont(new Font("Tahoma", Font.BOLD, 15));
		add(button);
		
		button_2 = new JButton("Back to the list of assignments");
		springLayout.putConstraint(SpringLayout.WEST, button_2, 54, SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.SOUTH, button_2, -57, SpringLayout.SOUTH, this);
		button_2.setFont(new Font("Tahoma", Font.BOLD, 13));
		add(button_2);
		
		btnUpdateDateTo = new JButton("Update date to commit");
		springLayout.putConstraint(SpringLayout.NORTH, btnUpdateDateTo, 302, SpringLayout.NORTH, this);
		springLayout.putConstraint(SpringLayout.WEST, btnUpdateDateTo, 306, SpringLayout.WEST, this);
		springLayout.putConstraint(SpringLayout.EAST, btnUpdateDateTo, -343, SpringLayout.EAST, this);
		springLayout.putConstraint(SpringLayout.WEST, button, 0, SpringLayout.WEST, btnUpdateDateTo);
		springLayout.putConstraint(SpringLayout.SOUTH, button, -84, SpringLayout.NORTH, btnUpdateDateTo);
		btnUpdateDateTo.setFont(new Font("Tahoma", Font.BOLD, 15));
		add(btnUpdateDateTo);
		
		lblAssid = new JLabel("assid");
		springLayout.putConstraint(SpringLayout.NORTH, lblAssid, 8, SpringLayout.SOUTH, label);
		springLayout.putConstraint(SpringLayout.WEST, lblAssid, 0, SpringLayout.WEST, label);
		add(lblAssid);
		lblAssid.setVisible(false);
		
	}
}
